<div ng-if="isState('content-view.yum.filter.erratum.available')">
  <div class="row">
    <form name="errataForm" class="col-sm-5">
      <div ng-include="'content-views/details/filters/views/date-type-errata.html'"></div>
    </form>
  </div>
</div>

<div data-extend-template="layouts/partials/table.html">
  <span data-block="no-rows-message" translate>
    No Errata to display
  </span>

  <span data-block="no-search-results-message" translate>
    Your search returned zero Errata.
  </span>

  <div data-block="list-actions">
    <button type="button" class="btn btn-primary"
            ng-show="isState('content-view.yum.filter.erratum.list') && permitted('edit_content_views', contentView)"
            ng-disabled="table.working || table.numSelected === 0"
            ng-click="removeErrata(contentView)">
      <span translate>Remove Errata</span>
    </button>
    <button type="button" class="btn btn-primary"
            ng-show="isState('content-view.yum.filter.erratum.available') && permitted('edit_content_views', contentView)"
            ng-disabled="table.working || table.numSelected === 0"
            ng-click="addErrata(filter)">
      <span translate>Add Errata</span>
    </button>
  </div>

  <table data-block="table" class="table table-bordered table-striped">
    <thead>
      <tr bst-table-head row-select>
        <th bst-table-column translate>Errata ID</th>
        <th bst-table-column translate>Errata Type</th>
        <th bst-table-column translate>Issued</th>
        <th bst-table-column translate>Updated</th>
        <th bst-table-column translate>Title</th>
        <th bst-table-column translate>Modular</th>
      </tr>
    </thead>

    <tbody>
      <tr bst-table-row ng-repeat="errata in table.rows" row-select="errata">
        <td bst-table-cell>{{ errata.errata_id }}</td>
        <td bst-table-cell>
          {{ errata.type }}
        </td>
        <td bst-table-cell>
          <date date="errata.issued" />
        </td>
        <td bst-table-cell>
          <date date="errata.updated" />
        </td>
        <td bst-table-cell>{{ errata.title }}</td>
        <td bst-table-cell ng-if="errata.module_streams.length > 0" translate> Yes </td>
        <td bst-table-cell ng-if="errata.module_streams.length == 0" translate> No </td>
      </tr>
    </tbody>
  </table>
</div>
